import 'package:backend.core/core/domain/entities/user.dart';
import 'package:equatable/equatable.dart';

class EndUser extends Equatable implements User {
  const EndUser({
    required this.id,
    required this.email,
    required this.password,
  });

  @override
  final String id;

  @override
  final String email;

  @override
  final String password;

  @override
  List<Object?> get props {
    return [
      id,
      email,
      password,
    ];
  }

  @override
  EndUser copyWith({
    String Function()? id,
    String Function()? email,
    String Function()? password,
  }) {
    return EndUser(
      id: id == null ? this.id : id(),
      email: email == null ? this.email : email(),
      password: password == null ? this.password : password(),
    );
  }
}
